package cn.study.concurrenthashmap.otherconcurrent;

import java.util.concurrent.ConcurrentSkipListSet;

public class ConcurrentSkipListSetExample {
    public static void main(String[] args) {
        ConcurrentSkipListSet<Integer> set = new ConcurrentSkipListSet<>();

        // 添加一些元素
        set.add(10);
        set.add(5);
        set.add(20);

        // 访问元素
        System.out.println("Contains 10: " + set.contains(10));

        // 导航方法
        System.out.println("First Element: " + set.first());
        System.out.println("Last Element: " + set.last());
        System.out.println("Head Set (elements less than 15): " + set.headSet(15));
    }
}
